﻿<!--{inc(header.view.html)}-->

<div class="content" id="content">
	<div class="top-menu-box">
    	<div class="z">
            <span class="z-f"><a href="#">网站设置</a>&nbsp;&gt;</span>
            <span class="z-f"><a href="#">用户视图数据库修改</a></span>
            <div class="z-f-r"><span class="user-t"><a href="{$site_url}"  target="_blank">网站首页</a></span><span class="user-info"></span><a href="index.php?app=default&act=quit" onClick="return confirm('确认退出管理系统吗？');"   >退出管理</a></div>
        </div>
        <div class="top-menu">
        	<ul>
                                                 <li><a href="?app=icon&act=viewmanageedit&{$urlstr}"   target="_self">Icon标签修改</a></li>
												 
												 <li><a href="?app=icon&act=viewmanagedataedit&{$urlstr}"   target="_self">Icon数据库视图修改</a></li>
												<li class="current"><a href="#" >用户视图数据库修改</a></li>
                                                 <li><a href="?app=icon&act=viewmanageactiveedit&{$urlstr}"   target="_self">Icondata时间控制修改</a></li>	
												 <li><a href="?app=icon&act=viewmanagetableedit&{$urlstr}&tb=usermoney.userid|users.id&fd=users.id|usermoney.intro"   target="_self">Icon表单数据调用</a></li>																			 
												 <li><a href="?app=icon&act=viewmanagecacheedit&{$urlstr}"   target="_self">Icon缓存数据调用</a></li>													
												 <li><a href="?app=icon&act=viewmanagehtmledit&{$urlstr}"   target="_self">HTML修改</a></li>	
                                                 <li><a href="{$fromurl}"   target="_self">返回主站</a></li>	
					
				
            </ul>
            <div class="clear"></div>
        </div>
    </div>
    
    <div class="main">



<?php 

if(!isset($data.iconname)) { $data.iconname='';} 
if(!isset($data.description)) { $data.description='';} 
if(!isset($data.iconcontent)) { $data.iconcontent='';} 
if(!isset($data.config.tablename)) { $data.config.tablename='';} 
if(!isset($data.config.fields)) { $data.config.fields='';} 
if(!isset($data.config.order)) { $data.config.order='';} 
if(!isset($data.config.limit)) { $data.config.limit='';} 
if(!isset($data.config.conditions)) { $data.config.conditions='';} 
if(!isset($data.config.pageurl)) { $data.config.pageurl='';} 
if(!isset($data.config.cachedatadir)) { $data.config.cachedatadir='';} 
if(!isset($data.config.cachefields)) { $data.config.cachefields='';} 
if(!isset($data.config.icondata)) { $data.config.icondata='';} 
if(!isset($data.config.iconfields)) { $data.config.iconfields='';} 
if(!isset($data.config.labels)) { $data.config.labels='';} 
if(!isset($data.config.htmlname)) { $data.config.htmlname='';} 
if(!isset($data.config.htmlconfig)) { $data.config.htmlconfig='';} 

?>                                
                                 


<form action="?app=icon&act=viewmanagetableuseredit&action=post" method="post" enctype="multipart/form-data" name="form1"  onSubmit="return post(this);">

<table  class="data" >
<tbody>

    <tr  onMouseOut="this.className=''" onMouseOver="this.className='bgcolor'"> 
      <td width='20%' align='right' ><font color=red>*</font><strong>栏目选择</strong>:</td>
      <td width='80%'  > 
        <!--
-->
<style>
.pub_cate_menu{ 
border:1px #CCCCCC solid; 
background-color:#f9f9f9;
color:#333333;
width:350px;
height:200px;
float:left;
overflow-Y:auto;
overflow-X:hidden;
margin-right:5px; 
padding:5px;
}
.pub_cate_menu a{
color:#343434;
line-height:150%;
}
.pub_cate_menu .selected{
 font-weight:bold; color:#FF3300; padding-right:20px; background:url({$web_view_dir}style/images/icn_ok.gif) right no-repeat;
}
.pub_cate_menu unselected{
}

.choosedok{ width:500px;}

</style>

<div id="cate_menu" style="display:block">
<div class="pub_cate_menu" id="cate_menu_1">
<?php foreach($changeClassName as $_key => $_value ) { ?>
	<div><a href="javascript:;" onClick="changeClassName(1,this,'{$_value.table},{$_value.filed1}|{$_value.filed2}',true,0,'{$site_url}/admin/');" >{$_value.name}</a></div>
<?php } ?>
	
 
</div>

<div class="pub_cate_menu" id="cate_menu_2"></div>

 
</div>

<iframe id="likeajaxform" src="about:blank" style="display:none;"></iframe>

<input type="hidden" value="0" id="fid"  name="fid"/>
<input name="ctype" type="hidden" id="ctype" value="0" />
<input name="id" type="hidden" id="id" value="0" />

<div style="clear:both;  padding:5px 8px 8px 35px;background:url({$web_view_dir}style/images/jiantou.jpg) left no-repeat;"  class="jiantou">
<span id="choosed" class="post_notice " >您当前选择的是:</span> &nbsp; 
 <input type="button"  value="↓ 添加" id="nextdo" disabled="disabled" style="background:none;background-color:#E8F3FC; height:auto; color:#FF0000" onClick="addFid();"/>
</div>
<div class="pub_cate_menu choosedok">
<strong>已经选择好的项目</strong>：(最多添加100个项目,<input name="no" type="checkbox" value="0" /><font color="blue">取消勾选即为移除对应分类</font>)
<div id="fiddb">
{$icontabledata}

</div>

</div>


<div style="clear:both"><input type="radio" name="fenorxin" value="1" <?php if( $is_fenorxin  == 1) { ?> checked <?php } ?>  >使用分类项&nbsp;&nbsp;&nbsp;<input type="radio" name="fenorxin" value="0"  <?php if( $is_fenorxin  == 0) { ?> checked <?php } ?>   >使用信息项</div>
<div style="clear:both">显示条数&nbsp;&nbsp;&nbsp;<input type="text" name="limitnum" value="{$limitnum}" size="20"></div>
<script language="javascript">
var g_page=1;
var g_fid = '';
var start_fid='';
var select_str = '';
//发布页选择类目JS动作
function changeClassName(slevel,my,fid,next,ctype,Murl)
{
    if(start_fid=='')
	{
	start_fid = fid;
	}
    if(start_fid)
	{
	  str1 = start_fid.split(",");
	  str2 = fid.split(",");
	  if(str1[0]!=str2[0])
	  {
	  	start_fid = fid;
		document.getElementById('cate_menu_2').innerHTML="";
		document.getElementById('fiddb').innerHTML="";
		document.getElementById('input').innerHTML="";		  
	  }
	}	
    if(fid==g_fid)
	{
	   g_page++;	   
	}else
	{
	g_page=1;
	}
	g_fid=fid;

	if(slevel>4) return false;
	for(var i=slevel+1;i<=2;i++){
		document.getElementById('cate_menu_'+String(i)).innerHTML="";			
	}
	
	document.getElementById("likeajaxform").src=Murl+'?app=icon&act=viewmanagetableuseredit&action=getfidsonslist&fup='+fid+'&class='+String(slevel+1)+"&ctype="+ctype+"&page="+g_page;
	
	var mydiv =document.getElementById('cate_menu_'+String(slevel));
	var mydivs=mydiv.getElementsByTagName('a');
	for(var i=0;i<mydivs.length;i++)
	{	
		mydivs[i].className='unselected';
	}
	my.className='selected';
	document.getElementById('fid').value=fid;
	if(next==false){
		document.getElementById('nextdo').disabled=false;
	}else{
		document.getElementById('nextdo').disabled="disabled";
	}
	
	create_mycate(slevel);
	
}
function create_mycate(slevel)
{
	var str='您当前选择的是:<font color="#232323">';

	for(var i=1;i<=slevel;i++)
	{
		var str2=getmydivs_choosedName(i);
		if(str2!=''){
		str+=" &gt; ";
		str+=str2;
		}		
	}
	document.getElementById('choosed').innerHTML=str+"</font>";
}
function getmydivs_choosedName(myi)
{
	var mydiv =document.getElementById('cate_menu_'+String(myi));
	var mydivs=mydiv.getElementsByTagName('a');
	for(var i=0;i<mydivs.length;i++)
	{	
		if(mydivs[i].className=='selected'){
			return mydivs[i].innerHTML;
		}
	}
	return "";

}
function inputcontent(content,slevel,select_str1){
    if(content=='&nbsp;')
	{
	alert('当前是该分类的最后一页内容，请切换分类进行选择！');
	return true ;
	}
	inputcontent_to(content,'cate_menu_'+String(slevel),select_str1);
}
function inputcontent_to(content,id,select_str1){
    select_str = select_str1;
	document.getElementById(id).innerHTML=content;
}

function addFid(){
	var fid=document.getElementById('fid').value;
	var str=document.getElementById('choosed').innerHTML.replace("您当前选择的是:"," ");
	var fiddb=document.getElementById('fiddb');
	try{
		var fiddbname=fiddb.getElementsByTagName('input');
		if(fiddbname.length>=100){
			alert('最多添加100个项目');
			return false;
		}
		for(var i=0;i<fiddbname.length;i++){
			if(fiddbname[i].value==fid){
				alert('不能重复添加!');
				return false;
			}
		}		
	}catch(e){
		
	}
	var onestr="<div id='div_"+fid+"'><input type='checkbox' name='fids[]' value='"+fid+"' checked onclick='removeFid(this);'> "+str+"</div>";
	fiddb.innerHTML=fiddb.innerHTML+onestr;
}
function removeFid(me){
	if(!confirm('确定放弃此项吗?')){
		me.checked=' checked';
		return false;
	}else{
		
		document.getElementById("div_"+me.value).innerHTML="";	
		document.getElementById("div_"+me.value).outerHTML="";	
		
	}
}
</script>


      </td>
    </tr>

							 
    	                                 

<tr>
	<td>&nbsp;</td>
	<td>
	<input type="hidden" name="pagename" value="{$pagename}" />
	<input type="hidden" name="strtempdata" value="{$strtempdata}" />
	<input type="hidden" name="fromurl" value="{$weburl}" />
	<input type="hidden" name="filedlist" value="{$data.config.fields}" />	
	<input type="submit" value=" 提 交 " class="buton"></td>
</tr>
</tbody></table>
</form>                                 
                                 
  <div style="display:none;"> 

  <form name="form2" method="post" action="" target="phpframe">

  </form>

</div>                            



	

        
        <div class="notic"><img  src="{$web_view_dir}style/images/light.gif" align="absmiddle" /> <b>提示: </b> <span ></span></div>
    </div>
</div>
<!--{inc(footer.view.html)}-->